from django.db import models
from utils.models import CoreModel, table_prefix


class Settings(CoreModel):
    key = models.CharField(max_length=50, unique=True)
    value = models.TextField(null=True)
    desc = models.CharField(max_length=255, null=True)

    def __repr__(self):
        return '<Setting %r>' % self.key

    class Meta:
        db_table = table_prefix + 'settings'
        verbose_name = '系统设置'
        verbose_name_plural = verbose_name
